const HtmlWebpackPlugin = require('html-webpack-plugin')
const path = require('path')

let page = [
    {
        path: ['index','./src/js/index.js'],
        html: new HtmlWebpackPlugin({
            // template: './src/index.html',
            template: 'html-withimg-loader!'+path.resolve('./src/page/', 'index.html'),
            filename: './page/index.html',
            chunks: ['index'],
        })
    },
    {
        path: ['information', './src/js/information.js'],
        html: new HtmlWebpackPlugin({
            template: './src/page/information.html',
            filename: './page/information.html',
            chunks: ['information'],
        })
    },
    {
        path: ['infoDetail', './src/js/infoDetail.js'],
        html: new HtmlWebpackPlugin({
            template: './src/page/infoDetail.html',
            filename: './page/infoDetail.html',
            chunks: ['infoDetail'],
        })
    },
    {
        path: ['giftbag', './src/js/giftbag.js'],
        html: new HtmlWebpackPlugin({
            template: './src/page/giftbag.html',
            filename: './page/giftbag.html',
            chunks: ['giftbag'],
        })
    },
    {
        path: ['getGift', './src/js/getGift.js'],
        html: new HtmlWebpackPlugin({
            template: './src/page/getGift.html',
            filename: './page/getGift.html',
            chunks: ['getGift'],
        })
    },
    {
        path: ['startGame', './src/js/startGame.js'],
        html: new HtmlWebpackPlugin({
            template: './src/page/startGame.html',
            filename: './page/startGame.html',
            chunks: ['startGame'],
        })
    },
    {
        path: ['miniGame', './src/js/miniGame.js'],
        html: new HtmlWebpackPlugin({
            template: './src/page/miniGame.html',
            filename: './page/miniGame.html',
            chunks: ['miniGame'],
        })
    },
    {
        path: ['microOnlineGame', './src/js/microOnlineGame.js'],
        html: new HtmlWebpackPlugin({
            template: './src/page/microOnlineGame.html',
            filename: './page/microOnlineGame.html',
            chunks: ['microOnlineGame'],
        })
    },
    {
        path: ['topicTotal', './src/js/topicTotal.js'],
        html: new HtmlWebpackPlugin({
            template: './src/page/topicTotal.html',
            filename: './page/topicTotal.html',
            chunks: ['topicTotal'],
        })
    },
    {
        path: ['specialTopic', './src/js/specialTopic.js'],
        html: new HtmlWebpackPlugin({
            template: './src/page/specialTopic.html',
            filename: './page/specialTopic.html',
            chunks: ['specialTopic'],
        })
    },
    {
        path: ['joinActivity', './src/js/joinActivity.js'],
        html: new HtmlWebpackPlugin({
            template: './src/page/joinActivity.html',
            filename: './page/joinActivity.html',
            chunks: ['joinActivity'],
        })
    },
    {
        path: ['activity', './src/js/activity.js'],
        html: new HtmlWebpackPlugin({
            template: './src/page/activity.html',
            filename: './page/activity.html',
            chunks: ['activity'],
        })
    },
    {
        path: ['search', './src/js/search.js'],
        html: new HtmlWebpackPlugin({
            template: './src/page/search.html',
            filename: './page/search.html',
            chunks: ['search'],
        })
    },
    {
        path: ['openSheet', './src/js/openSheet.js'],
        html: new HtmlWebpackPlugin({
            template: './src/page/openSheet.html',
            filename: './page/openSheet.html',
            chunks: ['openSheet'],
        })
    },
    {
        path: ['jh', './src/js/jh.js'],
        html: new HtmlWebpackPlugin({
            template: './src/page/jh.html',
            filename: './page/jh.html',
            chunks: ['jh'],
        })
    },
    {
        path: ['jf', './src/js/jf.js'],
        html: new HtmlWebpackPlugin({
            template: './src/page/jf.html',
            filename: './page/jf.html',
            chunks: ['jf'],
        })
    },
    {
        path: ['service', './src/js/service.js'],
        html: new HtmlWebpackPlugin({
            template: './src/page/service.html',
            filename: './page/service.html',
            chunks: ['service'],
        })
    }
]

module.exports = page
